package com.hmdp.test.asr;

/**
 * 默认ASR适配器(模拟实现)
 */
public class DefaultASRAdapter implements ASRService {
    private static final String VENDOR_ID = "default";
    
    @Override
    public ASRResponse textToSpeech(ASRRequest request) {
        System.out.println("模拟TTS服务，文本: " + request.getText());
        return ASRResponse.success(request.getText() + "(模拟合成)", VENDOR_ID);
    }
    
    @Override
    public ASRResponse speechToText(ASRRequest request) {
        System.out.println("模拟ASR服务，音频: " + request.getText());
        return ASRResponse.success("模拟识别结果: " + request.getText(), VENDOR_ID);
    }
    
    @Override
    public boolean supports(String vendorId) {
        // 默认适配器作为回退方案
        return true;
    }
}